package nuist.hanniko.stu.webbackend.service;

import nuist.hanniko.stu.webbackend.model.LwM2m.LwM2mDevice;

import java.util.Date;
import java.util.List;

public interface DeviceBriefService {

    List<LwM2mDevice> getDevicesByIndex(int start, int length);

    List<LwM2mDevice> getAllDevice();

    List<LwM2mDevice> getDeviceByType(String type);

    LwM2mDevice getByDeviceId(String deviceId);

    int updateStateById(String deviceId, String state);

    int updateRegistration(String deviceId, Date upTime);

    int insertOrUpdate(LwM2mDevice device);

    int SUCCESS = 1;

    int FAILURE = 0;
}
